<%@ page language="java" import="java.util.*"contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.hz.util.ParamUtil"%>
<%@page import="com.hz.control.ActTypeControl"%>
<%@page import="com.hz.model.ActType"%>
<%@page import="com.hz.model.User"%>
<%@page import="com.hz.model.ApplyAct"%>
<%@page import="com.hz.control.UserControl"%>
<%@page import="com.hz.control.ApplyActControl"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../css/active.css"/>
<title>Insert title here</title>
</head>
<body>
<%
      request.setCharacterEncoding("utf-8");
      User cu = (User)session.getAttribute("user");
      int actid = ParamUtil.getInt(request,"actid");
      ApplyAct a = ApplyActControl.getActivityInformation(actid);
 %>
<form>
<fieldset>
<legend class='title'>申请活动详情</legend>
<table class='add'>
<tr><td>活动名称</td><td><%=a.getName() %></td></tr>
  <tr><td>活动类型</td><td><%=ActTypeControl.getActTypeName(a.getActType()) %></td></tr>
  <tr><td>活动目的</td><td><%=a.getPurpose() %></td></tr>
  <tr><td>面向对象</td><td><%=a.getObject() %></td></tr>
  <tr><td>举办时间</td><td><%=a.getHoldTime() %></td></tr>
  <tr><td>负责人</td><td><%=a.getLeader() %></td></tr>
  <tr><td>联系方式</td><td><%=a.getContact() %></td></tr>
  <tr><td>活动流程</td><td><%=a.getProcedure() %></td></tr>
  <tr><td>经费</td><td><%=a.getBudget() %>元</td></tr>
  <tr><td>备注</td><td><%=a.getNotes() %></td></tr>
  <tr><td>申请人</td><td><%=UserControl.getUserInformation(a.getUserId()).getRealname() %></td></tr> 
  <tr><td>状态</td><td><%if(a.getState()==0) out.print("待审核");if(a.getState()==1) out.print("已通过");if(a.getState()==2) out.print("未通过"); %></td></tr> 
   <tr><td colspan='2'>
   <%
      if(cu!=null&&cu.getRole()==1&&a.getState()!=1){
      %>
      <input type="button" value="通过" onclick="window.location.href='../../admin/setApplyAct.jsp?state=1&&actid=<%=actid %>' " />&nbsp;
                    <input type="button" value="不通过" onclick="window.location.href='../../admin/setApplyAct.jsp?state=2&&actid=<%=actid %>'" />&nbsp;
                    <input type="button" onclick="return history.go(-1);" value="返回">&nbsp;
      <%
      }if(cu!=null&&cu.getRole()==1&&a.getState()==1){
   %>
   <input type="button" value="不通过" onclick="window.location.href='../../admin/setApplyAct.jsp?state=2&&actid=<%=actid %>' " />&nbsp;
      <%} if(cu!=null&&cu.getRole()==1){
   %>
<input type="button" value="删除" onclick="window.location.href='../../admin/deleteApplyAct.jsp?actid=<%=actid %>' " />&nbsp;
      
      <%} %>
  <%
      if(cu!=null&&cu.getId()==a.getUserId()){
      %>
      <input type="button" value="修改" onclick="window.location.href='ApplyActivity_update.jsp?acid=<%=a.getId() %>' " />&nbsp;
      <%
      
      }
   %>
       </td>
</tr>
  </table>
</fieldset>
</form>
</body>
</html>